package com.kazares.i18n;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Windows
 */
public class I18n {

    public Properties prop;
    public I18n() {
        prop = new Properties();        
        try {
            InputStream is = I18n.class.getResourceAsStream("spanish.properties");
            prop.load(is);
            is.close();
            System.err.println("Inicializacion de idioma completada");
        } catch (Exception ex) {
            System.err.println("Fallo la inicializacion de idioma:"+I18n.class);
            ex.printStackTrace();
        }        
    }

    public String get(String clave) {
        try{
            return prop.getProperty(clave);
        }catch(Exception e){
            return "";
        }
        
    }
}
